﻿using PetaPoco;
using PmSoft;
using PmSoft.Caching;
using System.ComponentModel;
using static Modules.BankSpecialAccount.BankSpecialAccountConstants;

namespace Modules.BankSpecialAccount.Entitys
{
    /// <summary>
    /// 专户支付明细
    ///</summary>
    [TableName("project_special_account_payment_details")]
    [Description("工资专户支付明细")]
    [PrimaryKey("Id", AutoIncrement = true)]
    [CacheSetting(true)]
    [Serializable]
    public class BankSpecialAccountPaymentDetails : IEntity
    {
        /// <summary>
        ///
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 项目ID
        ///</summary>
        [Column("project_id")]
        public int ProjectId { get; set; }

        /// <summary>
        /// 流水号（HTSerial）
        ///</summary>
        [Column("ht_serial")]
        public string HTSerial { get; set; }

        /// <summary>
        /// 代发批次号（批次号PCSerial）
        ///</summary>
        [Column("batch_no")]
        public string BatchNo { get; set; }

        /// <summary>
        /// 发放总数（FFTotalNum）
        ///</summary>
        [Column("number_issued")]
        public int NumberIssued { get; set; }

        /// <summary>
        /// 发放总额（FFTotalAmount）
        ///</summary>
        [Column("amount_issued")]
        public decimal AmountIssued { get; set; }

        /// <summary>
        /// 交易流水号（JYBrook）
        ///</summary>
        [Column("trade_serial")]
        public string TradeSerial { get; set; }

        /// <summary>
        /// 交易日期（JYDate）
        ///</summary>
        [Column("trade_date")]
        public string? TradeDate { get; set; }

        /// <summary>
        /// 交易时间（JYTime）
        ///</summary>
        [Column("trade_time")]
        public string? TradeTime { get; set; }

        /// <summary>
        /// 发卡账号（FKAccount）
        ///</summary>
        [Column("bank_account")]
        public string BankAccount { get; set; }

        /// <summary>
        /// 发卡户名（FKAccountName）
        ///</summary>
        [Column("bank_account_name")]
        public string BankAccountName { get; set; }

        /// <summary>
        /// 交易币种（JYBZ）
        ///</summary>
        [Column("currency")]
        public string Currency { get; set; }

        /// <summary>
        /// 交易金额（JYAmount）
        ///</summary>
        [Column("trade_amount")]
        public decimal TradeAmount { get; set; }

        /// <summary>
        /// （收）账号（SKAccount）
        ///</summary>
        [Column("payee_account")]
        public string PayeeAccount { get; set; }

        /// <summary>
        /// （收）户名（SKAccountName）
        ///</summary>
        [Column("payee_account_name")]
        public string PayeeAccountName { get; set; }

        /// <summary>
        /// （收）证件类别（SKZJLB）
        ///</summary>
        [Column("payee_cert_type")]
        public string PayeeCertType { get; set; }

        /// <summary>
        /// （收）证件号码（SKZJHM）
        ///</summary>
        [Column("payee_cert_no")]
        public string PayeeCertNo { get; set; }

        /// <summary>
        /// 交易摘要
        ///</summary>
        [Column("trade_abstract")]
        public string TradeAbstract { get; set; }

        /// <summary>
        /// 交易结果
        ///</summary>
        [Column("trade_result")]
        public string TradeResult { get; set; }

        /// <summary>
        /// KHTag
        ///</summary>
        [Column("kh_tag")]
        public string KHTag { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return Id; } }

        #endregion IEntity 成员
    }
}